Cryptography has became increasingly important in protecting firmware, program, and data with the rapid development of the information superhighway, the Internet, and the World Wide Web. Many of the well known cryptographic methods have been based on mathematical-intensive calculations, such as the RSA and Deffie-Hellman approaches, and not based on the design of digital electronics. The digital electronics approach seeks to protect firmware, program, and data with similar qualities and desirable characteristics as the RSA and Deffie-Hellman approaches. A desirable cryptographic approach encrypts and decrypts information quickly to minimize delays that occurs during the computation process while providing a high degree of security, such using multiple decryption keys, to withstand cryptoanalytic attacks.
FIGS. 1A-1B show a bit reverse ciphering technique for encrypting object codes and decrypting encrypted codes. The bit reverse ciphering technique uses an exclusive-OR operator for both the encrypting and decrypting processes. The exclusive-OR operator produces the same Boolean equation for taking an exclusive-OR operation of a first variable and a second variable to produce a result Y, and for taking the result Y and the second variable to obtain back the value of the first variable. In FIG. 1A, the object code X.sub.n is encrypted to an encrypted code Y.sub.n by an encrypted key k.sub.o by the Boolean equation: Y.sub.n =X.sub.n .sym.k.sub.0, where n=1, . . . , N. In FIG. 1B, the object code X.sub.n is retrieved by taking an exclusive-OR of Y.sub.n and k.sub.0 as denoted by the Boolean equation: X.sub.n =Y.sub.n .sym.k.sub.o, where n=1, . . . , N. The selection of the common Boolean operator for both the encryption process and decryption process reduces the complexity of the implementation while minimizes the delay in decoding the encrypted codes. However, the bit reverse ciphering technique is quite susceptible upon cryptoanalytic attack. A short key k.sub.0 can be easily decrypted by trying different possible permutations. Even if a key is constructed using a long string of object codes, the key is still not difficult to decrypt by using a probability density function to decrypt the encrypted code. Thus, the bit reverse ciphering technique is not desirable to protect object codes from intruders.
FIGS. 2A-2B show an inversible transform technique that is more difficult to decrypt than the bit reverse ciphering technique. The object code X.sub.n is encrypted to an encrypted code Y.sub.n by taking the transform of X.sub.n, represented by the equation Y.sub.n =T(X.sub.n). The transform T is selected as having a corresponding inverse transform as denoted by T.sup.-1. Correspondingly, the object code X.sub.n can be decrypted from the encrypted code Y.sub.n from the equation X.sub.n =T.sup.-1 (Y.sub.n). In the inversible transform ciphering technique, the process of encrypting an object code X.sub.n is different from the process of decrypting an encrypted code Y.sub.n. The following example illustrates this difference. For a first sequence of codes X.sub.n, where n=0, 1, 2, . . . , 7, that transforms to a second sequence of codes Y.sub.n, where n=0, 1, 2, . . . , 7, the transform T is characterized as follows:
000 to 001 PA0 001 to 101 PA0 010 to 111 PA0 011 to 011 PA0 100 to 110 PA0 101 to 000 PA0 110 to 100 PA0 111 to 010
The inversible transform ciphering technique has the characteristics of one-to-one mapping, which makes it vulnerable upon cryptoanalytic attach. The inversible transform may be decrypted by monitoring the statistic occurrence of codes to find the inverse transform by comparing the frequency of occurrence of the encrypted code Y.sub.n to the object code X.sub.n. For example, in a 3-bit binary string, the binary code "111" has the highest probability of occurrence relative to the other 3-bit binary codes. If the binary code "111" is mapped to the binary code "010", the binary code "010" in the encrypted domain retains the characteristics of the highest probability of occurrence as derived from the binary code "111". By observing the occurrence of codes, an intruder may be able to decrypt the mapping relationship between the object code X.sub.n and the encrypted code Y.sub.n. Therefore, the inversible transform ciphering technique is also vulnerable upon cryptoanalytic attach.
As shown in FIGS. 3A-3B, a non-inversible ciphering technique provides another alternative to protect an object code X.sub.n without subjecting the object code X.sub.n to be decrypted by statistical occurrence. The non-inversible ciphering technique provides high security to object codes X.sub.n because it does not have an one-to-one mapping relationship between the object code X.sub.n and the encrypted code Y.sub.n. Although the non-inversible ciphering technique provides high security to protect the object code X.sub.n, this technique does not have a corresponding inverse transform to decrypt the encrypted code Y.sub.n back to the object code X.sub.n. Without a corresponding inverse transform, the object code X.sub.n cannot be recovered on the basis of knowing the encrypted code Y.sub.n, and therefore, the non-inversible ciphering technique is not suitable to protect object codes in firmware, program, or data.
Accordingly, it is desirable to have a method and system for encrypting object codes and decrypting encrypted codes using a non-inversible transform.